home *** CD-ROM | disk | FTP | other *** search
- unit ImgTestU;
-
- interface
-
- uses
- Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
- StdCtrls, DBCtrls, Db, Grids, DBGrids, DBTables;
-
- type
- TForm1 = class(TForm)
- Button1: TButton;
- Table1: TTable;
- DBGrid1: TDBGrid;
- DataSource1: TDataSource;
- DBImage1: TDBImage;
- OpenDlg: TOpenDialog;
- Table1SpeciesNo: TFloatField;
- Table1Category: TStringField;
- Table1Common_Name: TStringField;
- Table1SpeciesName: TStringField;
- Table1Lengthcm: TFloatField;
- Table1Length_In: TFloatField;
- Table1Notes: TMemoField;
- Table1Graphic: TGraphicField;
- procedure Button1Click(Sender: TObject);
- private
- { Private declarations }
- public
- { Public declarations }
- end;
-
- var
- Form1: TForm1;
-
- implementation
-
- {$ifdef Ver100}
- uses
- JPEG;
- {$endif}
-
- {$R *.DFM}
-
- procedure TForm1.Button1Click(Sender: TObject);
- begin
- if OpenDlg.Execute then
- begin
- Table1.Insert;
- Table1Graphic.LoadFromFile(OpenDlg.FileName);
- Table1Common_Name.Value :=
- ExtractFileName(OpenDlg.FileName);
- Table1.Post
- end
- end;
-
- end.
-